const { loginConfig } = require("../config");
const axios = require('axios')

exports.getToken = function getToken() {
   return axios({
     method: "post",
     url: `https://www.yuque.com/oauth2/token`,
     headers: {
       "Content-Type": "application/x-www-form-urlencoded",
     },
     params: {
       client_id: loginConfig.client_id,
       code: loginConfig.code,
       grant_type: "client_code",
     },
   });
}